package per.com.service.ServiceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import per.com.bean.Order;
import per.com.bean.UserOrder;
import per.com.dao.PcOrderDao;
import per.com.service.PcOrderService;

import java.util.List;

/**
 * @Author: plx
 * @Date: 2019/5/21 11:00
 * @Version 1.0
 */
@Service("PcOrderServiceId")
public class PcOrderServiceImpl implements PcOrderService {
    @Autowired
    @Qualifier("PcOrderDaoId")
    private PcOrderDao pcOrderDao;

    @Override
    public void insertOrder(Order order) {
        pcOrderDao.insertOrder(order);
    }

    @Override
    public Order findOrderById(String orderId) {
        return pcOrderDao.findOrderById(orderId);
    }



    @Override
    public List<Order> getOrderByUserId(String userId) {
        return pcOrderDao.getOrderByUserId(userId);
    }

    @Override
    public void deleteOrder(String id, String userId) {
        pcOrderDao.deleteOrder(id, userId);
    }


}
